/**
*      author: Y_Yao
*      created: 2025-04-07 12:56:55
**/

#include<bits/stdc++.h>

#define int LL
using namespace std;
using LL = long long;
const LL LLINF = 9e18;
const int INF = 0x3f3f3f3f;
const int N = 1e5 + 7;
const int mod = 1e9 + 7;
int a[N];
int dp[N];
int n,m;
set<int> s;

void solve()
{
    cin >> n >> m;
    for(int i = 1;i <= m;i++)
    {
        cin >> a[i];
        s.insert(a[i]);
    }
    dp[0] = 1;
    for(int i = 1;i <= n;i++)
    {
        if(s.count(i)) continue;
        if(i == 1) dp[i] = 1;
        else
        {
            dp[i] = (dp[i-1] + dp[i-2]) % mod;
        }
    }
    // for(int i = 1;i <= n;i++)
    // {
    //     cout << dp[i] << " ";
    // }
    // cout << endl;
    cout << dp[n] << endl;
}

signed main()
{
    ios::sync_with_stdio(false);
    cin.tie(0);

    int t = 1;
    // cin >> t;
    while(t--)
    {
        solve();
    }
    return 0;
}